#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
int main()
{
    char password[100];
    char repassword[100];
    scanf("%s %s", password, repassword);
    if (strcmp(password, repassword) == 0)
        printf("same\n");
    else
        printf("different\n");
    return 0;
}